package com.lwt.db137.service.Impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lwt.db137.bean.Role;
import com.lwt.db137.mapper.RoleMapper;
import com.lwt.db137.service.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Description  
 * @version 1.0 
 * @author lwt
 * @date 2024/12/24 11:48
 */
@Service
public class RoleServiceImpl extends ServiceImpl<RoleMapper, Role> implements RoleService {
    @Autowired
    private RoleMapper roleMapper;

    @Override
    public int insert(Role role) {
        return roleMapper.insert(role);
    }

    @Override
    public int updateMenuById(Role role) {
        return roleMapper.updateById(role);
    }

    @Override
    public int deleteById(Integer id) {
        return roleMapper.deleteById(id);
    }

    @Override
    public List<Role> selectRoleById(int userid) {
        return roleMapper.selectRoleById(userid);
    }
}
